' 'F6FBB "LOGON TEXT" UTILITY WITH AUTHORISATION RUTINE G6WHL @ GB7KLY 1992 'This program is specifically for use in an F6FBB v 5.14 BBS PG directory and 'allows authorised callsigns to add text to a {language}.ENT bbs logon 'text file. It is intended for use by local ARS secretaries and the like to 'publicise club events on their local F6FBB packet BBS. (The prior agreement 'of the BBS sysop should be sought of course.) See also the "help" in program. 'SYSOPS: 'For this version of the LOGON program a file (LOGON.SYS) *may* exist in the 'DEFAULT directory (\FBB) which is expected to contain the callsigns of those 'persons who are authorised to use the LOGON program.(1 call/line-upper case) 'If LOGON.SYS does not exist ALL bbs users will have access. The compiled 'LOGON.EXE file should be placed in the PG directory and the bbs re-booted. 'As before, compile with almost anything except turbo basic HI. G6WHL @ GB7KLY c$ = COMMAND$ 'Get users call+text etc. fil$ = "C:\FBB\SYSTEM\LANG\ENGLISH." 'Specify which language file i = INSTR(c$, "-") 'Find end of callsign IF i = 0 THEN GOTO help 'Not run from PG rutine!! cs$ = LEFT$(c$, i - 1) 'Isolate callsign on error goto no.sys.file 'Maybe LOGON.SYS doesn't exist OPEN "i", #1, "logon.sys" 'Try to open sysop file (ERROR) while not eof(1) 'loop through callsigns | line input#1,s$ 'read a callsign | if s$=cs$ then close#1:goto sysop 'This OM is authorised >>> | wend 'callsign doesn't match. | PRINT "Prior authorisation needed." 'Callsign not authorised | END 'Back to the bbs >>>> | no.sys.file: 'Can't open LOGON.SYS <---- resume sysop 'continue with program sysop: 'Current user is authorised on error goto 0 'remove old error trap c = 1 'Initialise character counter s = 0 'Initialise a space counter findtxt: 'find start of users text IF c = LEN(c$) THEN GOTO remove.entry 'Delete an existing entry IF MID$(c$, c, 1) = " " THEN s = s + 1 'Found start of a new word c = c + 1 'Increment character counter IF s < 4 THEN GOTO findtxt 'Not found start of text yet 'The start of the users text has been found. OPEN "a", #1, fil$ + "ent" 'Open file for appending PRINT #1, cs$; ":"; MID$(c$, c) 'Append the new text PRINT "The following logon text has been recorded...." 'Report to user. PRINT cs$; ":"; MID$(c$, c) PRINT "Please send a LOGON command with no text to erase it later." END 'Back to the bbs >>>> remove.entry: e = 0 'Initialise erase flag. OPEN "i", #1, fil$ + "ent" 'Open existing file OPEN "o", #2, fil$ + "$$$" 'Create a new file WHILE NOT EOF(1) 'Loop through entire file LINE INPUT #1, t$ 'and copy contents of old one IF LEFT$(t$, LEN(cs$)) <> cs$ THEN PRINT #2, t$ ELSE e = e + 1: PRINT t$ WEND 'NOT de callsign(Count erases) CLOSE 'Close both files. IF e = 0 THEN KILL fil$ + "$$$": GOTO help 'Nowt to erase so offer help KILL fil$ + "ENT" 'Get rid of old file NAME fil$ + "$$$" AS fil$ + "ENT" 'And rename the new file PRINT "The above text/s from "; cs$; " erased." 'Report to user END 'Back to the bbs >>>> help: PRINT "------------------------------------------------------------------------------" PRINT "The LOGON program allows users to add logon text to the BBS." PRINT "" PRINT "To use the logon text program you should send the following command to the BBS." PRINT "LOGON Emergency RAYNET meeting tonight 8:30 at Freds." PRINT "...and the line...." PRINT "{YOURCALLSIGN}:EMERGENCY RAYNET MEETING TONIGHT 8:30 AT FREDS." PRINT "...will greet BBS users when they log onto the system." PRINT PRINT "To cancel your logon text simply send a LOGON command to the BBS without text." PRINT "------------------------------------------------------------------------------" END 'Back to the bbs >>>> (Source G6WHL @ GB7KLY) (Downloaded from GB7BBS)